import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import store from './store'
import url from './common/config.js'
import request from './common/request.js'
import uView from 'uview-ui'



Vue.config.productionTip = false
Vue.prototype.$request = request
// Vue.prototype.$api = api
Vue.prototype.$url = url
Vue.prototype.$uView = uView


// 将 pages.json 内容挂载到全局变量
try {
  Vue.prototype.$pages = require('@/pages.json');
  console.log('pages.json loaded successfully:', Vue.prototype.$pages);
} catch (error) {
  console.error('Failed to load pages.json:', error);
}

App.mpType = 'app'
const app = new Vue({
    ...App,
	store,
	
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif